package cn.imu.appdevexperiment2020._1activity;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;

import androidx.annotation.Nullable;

import butterknife.OnClick;
import cn.imu.appdevexperiment2020.R;
import cn.imu.appdevexperiment2020.common.BaseActivity;

/**
 * 描述:
 *
 * @author chenconghua
 * @version 1.0
 * @create 2022-10-29 20:49
 */
public class LifeCycleActivity extends BaseActivity {
   private static final String TAG = "LifeCycleActivity";
   @Override
   protected void onCreate(@Nullable Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_lifecycle);

   }

   @Override
   protected void onStart() {
      super.onStart();
      Log.d(TAG,"onStart");
   }

   @Override
   protected void onResume() {
      super.onResume();
      Log.d(TAG,"onResume");
   }

   @Override
   protected void onPause() {
      super.onPause();
      Log.d(TAG,"onPause");
   }

   @Override
   protected void onStop() {
      super.onStop();
      Log.d(TAG,"onStop");
   }

   @Override
   protected void onDestroy() {
      super.onDestroy();
      Log.d(TAG,"onDestroy");
   }

   @Override
   protected void onRestart() {
      super.onRestart();
      Log.d(TAG,"onRestart");
   }

   @OnClick(R.id.btn1)
   public void btn1(){

      Intent intent= new Intent(LifeCycleActivity.this,NormalActivity.class);
      startActivity(intent);
   }

   @OnClick(R.id.btn2)
   public void btn2(){
      Intent intent= new Intent(LifeCycleActivity.this,DialogActivity.class);
      startActivity(intent);
   }
}
